package com.zhike.b2b.base;

import javax.annotation.Resource;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.springframework.context.ApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.zhike.b2b.advert.IAdsService;
import com.zhike.b2b.bizservice.impl.IBizServService;
import com.zhike.b2b.buy.IBuyService;
import com.zhike.b2b.company.ICompanyService;
import com.zhike.b2b.expand.IExpandService;
import com.zhike.b2b.expo.IExpoService;
import com.zhike.b2b.html.IHtmlService;
import com.zhike.b2b.html.ILinkService;
import com.zhike.b2b.job.IJobService;
import com.zhike.b2b.mall.IGoodsService;
import com.zhike.b2b.market.IMarketService;
import com.zhike.b2b.news.INewsService;
import com.zhike.b2b.product.IProdClassService;
import com.zhike.b2b.product.IProductService;
import com.zhike.b2b.sysparam.IParamService;

public class BaseAction {
	@Resource
	protected INewsService ns;
	@Resource
	protected IParamService ps;
	@Resource
	protected IProductService prs;
	@Resource
	protected IProdClassService pcs;
	@Resource
	protected ICompanyService cs;
	@Resource
	protected IExpoService es;
	@Resource
	protected IJobService js;
	@Resource
	protected IBizServService bss;
	@Resource
	protected IBuyService is; 
	@Resource
	protected ILinkService ls;
	@Resource
	protected IGoodsService gs;
	@Resource
	protected IMarketService ms;
	@Resource
	protected IAdsService as;
	@Resource
	protected IHtmlService hs;
	@Resource
	protected IExpandService exs;
	
	protected ApplicationContext getBeanContext(HttpServletRequest request)
	{
			ServletContext sc = request.getSession().getServletContext();
			ApplicationContext ac = WebApplicationContextUtils.getRequiredWebApplicationContext(sc);
			return ac;
	}
	


}
